/*
 * Copyright (c) 2020, 2025, keyila All rights reserved.
 *
 */
package com.clp.study.Test.ElevenToTwenty;

import java.util.ArrayList;

/**
 * @author clp
 * @version 1.0
 */
public class EightQ {
    public static void main(String[] args) {
        ArrayList<Integer> list=new ArrayList<>();
        list.add(1);
        list.add(2);
        list.add(3);
        for (Integer num:list){
            if (num==2){
                list.remove(num);
            }
        }
        System.out.println(list);
    }
}
